/*
 * @Author: qianmingtian
 * @Date: 2020-07-07 15:17:45
 * @LastEditors: qianmingtian
 * @LastEditTime: 2020-07-07 16:13:18
 * @FilePath: \qianmingtian.github.io\code\java\abstractPrac\Customer.java
 */ 
package abstractPrac;

public class Customer {
    
    private FoodMenu foodMenu;

    public Customer(FoodMenu foodMenu){
        this.foodMenu = foodMenu;
    }

    public FoodMenu getFoodMenu() {
        return foodMenu;
    }

    public void setFoodMenu(FoodMenu foodMenu) {
        this.foodMenu = foodMenu;
    }

    public void order(){
        foodMenu.chaojidan();
        foodMenu.rousi();
    }
    

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((foodMenu == null) ? 0 : foodMenu.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        Customer other = (Customer) obj;
        if (foodMenu == null) {
            if (other.foodMenu != null)
                return false;
        } else if (!foodMenu.equals(other.foodMenu))
            return false;
        return true;
    }

    @Override
    public String toString() {
        return "Customer [foodMenu=" + foodMenu + "]";
    }

    

    
}/*
 * @Author: qianmingtian
 * @Date: 2020-07-07 15:17:45
 * @LastEditors: qianmingtian
 * @LastEditTime: 2020-07-07 15:17:45
 * @FilePath: \qianmingtian.github.io\code\java\abstractPrac\Customer.java
 */ 
